# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=xkcdpass
pkgver=1.19.8
pkgrel=0
pkgdesc="Generate secure multiword passwords/passphrases"
url="https://github.com/redacted/XKCD-password-generator"
arch="noarch"
license="BSD-3-Clause"
depends="py3-xkcdpass"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="py3-$pkgname-pyc py3-$pkgname:py3"
source="https://files.pythonhosted.org/packages/source/x/xkcdpass/xkcdpass-$pkgver.tar.gz"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 tests/test_xkcdpass.py
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl
}

py3() {
	pkgdesc="Python library for $pkgname"

	amove usr/lib/python*
}

sha512sums="
f218a9afdf103444558233f9fe32655d2c604f3553d2782a923f73baa4d69495871557a753a5f38be4607bd373df43cf425c0cc6675b0b1b34723098fdeff7b5  xkcdpass-1.19.8.tar.gz
"
